package cn.cc.设计模式;


import java.util.Observable;

class House extends Observable{
    private float price ;

    public House(float price) {
        this.price = price ;
    }
    public float getPrice(){
        return this.price ;
    }
    public void setPrice(float price){
        super.setChanged();
        super.notifyObservers();
        this.price = price ;
    }
    public String toString(){
        return "房子的价格为 ： " + price ;
    }
}
class HousePriceObserver implements java.util.Observer{

    @Override
    public void update(Observable o, Object arg) {
        
    }
}
public class Observer {
}
